<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title></title>
		<link rel="stylesheet" href="__OEM__/css/iconfont.css" />
		<link rel="stylesheet" href="__OEM__/css/css.css" />
		<script type="text/javascript" src="__PUBLIC__/static/js/jquery.min.js"></script>
		<link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css">
		<script src="__PUBLIC__/static/layui/layui.all.js"></script>
	</head>

	<body>
		<!--新增弹出框开始-->
		<div class="maskbox">
			<form class="form form-horizontal" id="form-admin-add" method="post">
				<input type="text" value="{$id}" id="id" name="id" style="display: none;">
				<div class="shxx_row clearfix" style="padding-top: 15px;">
					<div class="right">
						<div class="htrig_box">
							<div class="htrig_con">
								<textarea name="content" id="content" placeholder="驳回原因" style="width: 400px; height: 120px;"></textarea>
							</div>
						</div>
					</div>
				</div>
				<div class="add_btnbox" >
					<button type="button" class="add_btn_yes" id="tijiao">确定</button>
				</div>
			</form>
		</div>
	</body>

</html>
<script>
	$('#tijiao').click(function() {
		var content = $('#content').val();

		if(content.trim() ==""){
			layer.msg('驳回原因不能为空');
			return;
		}

		$.ajax({
			type: 'post',
			data: {
				id	:$('#id').val(),
				content: $('#content').val()
			},
			url: "{:url('count/examine_reject')}",
			success: function(data) {
				if(data.code == 200) {
					layer.msg(data.msg, {
						icon: 1,
						time: 1000
					}, function() {
						window.parent.location.reload();
					});
				} else {
					layer.msg(data.msg, {
						icon: 1,
						time: 1000
					});
				}

			}
		});
	});
</script>